package com.hangim.pce.service.impl;

import com.hangim.pce.model.SysPrescriptionDetailRule;
import com.hangim.pce.mapper.SysPrescriptionDetailRuleMapper;
import com.hangim.pce.common.service.impl.BaseEntityServiceImpl;
import com.hangim.pce.service.SysPrescriptionDetailRuleService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 规则触发处方详情表 服务实现类
 * </p>
 *
 * @author hongjiliang
 * @since 2018-10-19
 */
@Service
public class SysPrescriptionDetailRuleServiceImpl extends BaseEntityServiceImpl<SysPrescriptionDetailRuleMapper, SysPrescriptionDetailRule> implements SysPrescriptionDetailRuleService {

    @Override
    public Integer saveRule(SysPrescriptionDetailRule rule){
        rule.setActive(true);
        rule.setCreatedAt(getTimestamp());
        return save(rule);
    }
}
